<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="css/bdqnreg.css"/>
		<script src="js/jQuery-1.8.3.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$(function(){
				$("#email").blur(function(){
					var reg = /^\w+@\w+(\.[a-z]{2,3}){1,2}$/;
					if($(this).val().length==0){
						$("#_email_em").html("邮箱不能为空").css("color","red");
						return false;
					}else if(!reg.test($(this).val())){
						$("#_email_em").html("邮箱格式不正确").css("color","red");
						return false;
					}
					$("#_email_em").html("");
					return true;
				});
				$("#nickname").blur(function(){
					var reg=/^\S{4,12}$/;
					if($(this).val().length==0){
						$("_nickname_em").html("昵称不能为空").css("color","red");
						return false;
					}else if(!reg.test($(this).val())){
						$("_nickname_em").css("color","red");
						return false;
					}
					$("_nickname_em").html("");
					return true;
				});
				$("#password").blur(function(){
					var reg=/^\w{6,16}$/;
					if($(this).val().length==0){
						$("_password_em").html("密码不能为空").css("color","red");
						return false;
					}else if(!reg.test($(this).val())){
						$("_password_em").css("color","red");
						return false;
					}
					$("_password_em").html("");
					return true;
				});
				$("#password2").blur(function(){
					if($(this).val()==0){
						$("_password_em2").html("确认密码不能为空").css("color","red");
						return false;
					}else if($(this).val()!=$("#password").val()){
						$("_password_em2").html("两次密码输入不一致，请重新填写").css("color","red");
						return false;
					}
					$("_password_em2").html("");
					return true;
					
				});
				$("#yzm").blur(function(){
					if($(this).val()==0){
						$("_yzm_em").html("验证码不能为空").css("color","red");
						return false;
					}
					$("_yzm_em").html("");
					return true;					
				});
				$("#myform").submit(function(){
					var flag=$("#email").trigger("blur")&$("#nickname").trigger("blur")&$("#password").trigger("blur")&$("#password2").trigger("blur")&$("#yzm").trigger("blur");
					return flag>0;
				});
			});
		</script>
	</head>
	<body>
		<div id="middle">
			<div id="regbox">
				<ul class="regmethods">
					<li>手机注册</li>
					<li>邮箱注册</li>
				</ul>
				<div id="regtabbox">
					<form action="" method="post" id="myform">
						<div class="regmailleft">
							<ul>
								<li>
									<div class="reg-rela">
										<input type="text" name="email" value="" placeholder="请输入您的常用邮箱" class="reg-input" id="email">
										<span class="reg-prev prev-mail"></span>
									</div>
									<div class="reg-tip">
										<!--正确显示&&&错误显示 添加class"reg-error"-->
										<label class="reg-r-tip"><em id="_email_em">请输入您的常用邮箱</em></label>
									</div>
								</li>
								<li>
									<div class="reg-rela">
										<input type="text" name="nickname" value="" placeholder="请输入昵称" class="reg-input" id="nickname">
										<span class="reg-prev prev-tel"></span>
									</div>
									<div class="reg-tip">
										<!--无错误显示-->
										<label class="reg-r-tip"><em id="_nickname_em">4-12位字符、英文、数字或者中文均可</em></label>
									</div>
								</li>
								<li>
									<div class="reg-rela">
										<input type="password" name="password" class="reg-input" id="password" placeholder="请输入密码">
										<span class="reg-prev prev-word"></span>
									</div>
									<div class="reg-tip">
										<!--无错误显示-->
										<label class="reg-r-tip" id="password-tip"><em id="_password_em">6-16位字符或数字、字母,区分大小写</em></label>
									</div>
								</li>
								<li>
									<div class="reg-rela">
										<input type="password" name="password2" class="reg-input" id="password2"  placeholder="请再次输入密码">
										<span class="reg-prev prev-word"></span>
									</div>
									<div class="reg-tip">
										<!--错误显示-->
										<label class="reg-r-tip" id="psw-agin-tip"><em id="_password2_em"></em></label>
									</div>
								</li>
															<li>
									<div class="reg-rela">
										<input class="reg-input mail-reg-input" value="" placeholder="请输入右侧验证码" name="yzm" id="yzm" type="text">
										<span class="reg-prev prev-code"></span>
										<span class="mail-get-code">
											<img title="看不清楚,换一张" id="yw0" src="img/bdqn/59a11fa7365d1.png" alt="">									</span>
									</div>
									<div class="reg-tip">
										<label class="reg-r-tip" id="code-tip"><em id="_yzm_em">不区分大小写，点击图片可更换</em></label>
									</div>
								</li>
															<li class="agree-li">
									<div class="agree-li-l">
										<input type="checkbox" class="agreeCheck" id="agree" checked="">
										<label>同意<a href="javascript:void(0);" id="agreeListens">用户服务条款</a></label>
									</div>
									<div class="reg-tip">
										<label class="reg-r-tip"><em id="_agree_em"></em></label>
									</div>
								</li>
								<li class="submit-li">
									<input type="submit" class="reg-btn" value="注册" id="regs">
								</li>
							</ul>
						</div>
					</form>
					
					
					<div class="regtabright">
						<a href="http://i.bdqn.cn/login" class="goto-login">已有帐号，马上登录</a>
					</div>
				</div>
			</div>
		</div>
	</body>
</html>
